from scrapy import cmdline
cmdline.execute('scrapy crawl my_spider'.split())